﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Principal.Master" AutoEventWireup="true" CodeBehind="Vencimientos.aspx.cs" Inherits="Consulta.Web.Pages.Vencimientos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table>
        <tr>
            <td>Nit Proveedor:</td>
            <td>
                <asp:TextBox ID="txtFiltro" runat="server" Width="100px"></asp:TextBox>
                <asp:ImageButton ID="imgBuscTerc" runat="server" ToolTip="Bucsar Nit de Tercero" />
            </td>
            <td colspan="2">
                <asp:Label ID="lblNombre" runat="server" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td>Desde:</td>
            <td>
                <asp:TextBox runat="server" ID="txtDesde" autocomplete="off" Width="100px"/><br />
                <ajaxToolkit:CalendarExtender ID="customCalendarExtender1" runat="server" 
                    Format="dd/MM/yyyy" TargetControlID="txtDesde"/>
            </td>
            <td>Hasta:</td>
            <td>
                <asp:TextBox runat="server" ID="txtHasta" autocomplete="off" Width="100px"/><br />
                <ajaxToolkit:CalendarExtender ID="customCalendarExtender2" runat="server" 
                    Format="dd/MM/yyyy" TargetControlID="txtHasta"/>
            </td>
        </tr>
    </table>
    <p><asp:Button ID="btnBuscar" runat="server" Text="Buscar"/></p>
    <div>
        <asp:GridView ID="GridView1" runat="server" BackColor="White" 
            BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
            DataSourceID="ObjectDataSourceTercero" GridLines="Horizontal"
            AutoGenerateColumns="False"
            AllowSorting="true"
            AllowPaging="true"
            PageSize = "20">
            
            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Center" />
            <PagerSettings FirstPageText="Primero" LastPageText="Ultimo"/>
            
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
            <AlternatingRowStyle BackColor="#F7F7F7" />
            <Columns>
                <asp:BoundField DataField="Cia" HeaderText="Cia" SortExpression="Cia" />
                <asp:BoundField DataField="Acreedor" HeaderText="Acreedor" SortExpression="Acreedor" />
                <asp:BoundField DataField="Factura" HeaderText="Factura" SortExpression="Factura" ItemStyle-HorizontalAlign="Right"/>
                <asp:BoundField DataField="Fecha" HeaderText="Fecha" SortExpression="Fecha" HtmlEncode="False" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center"/>
                <asp:BoundField DataField="Vencimiento" HeaderText="Vencimiento" SortExpression="Vencimiento" HtmlEncode="False" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center"/>
                <asp:BoundField DataField="Anno" HeaderText="Año" SortExpression="Anno" ItemStyle-HorizontalAlign="Center"/>
                <asp:BoundField DataField="Semana" HeaderText="Semana" SortExpression="Semana" ItemStyle-HorizontalAlign="Center"/>
                <asp:BoundField DataField="Valor"  HeaderText="Valor" SortExpression="Valor" DataFormatString="{0:n0}" HtmlEncode="False" ItemStyle-HorizontalAlign="Right"/>
                <asp:BoundField DataField="Moneda" HeaderText="Mon" SortExpression="Moneda" ItemStyle-HorizontalAlign="Center"/>
                <asp:BoundField DataField="Abonos"  HeaderText="Abonos" SortExpression="Abonos" DataFormatString="{0:n0}" HtmlEncode="False" ItemStyle-HorizontalAlign="Right"/>
                <asp:BoundField DataField="Saldo"  HeaderText="Saldo" SortExpression="Saldo" DataFormatString="{0:n0}" HtmlEncode="False" ItemStyle-HorizontalAlign="Right"/>
                <asp:BoundField DataField="Observacion" HeaderText="Observacion" SortExpression="Observacion"/>
            </Columns>
        </asp:GridView>
    </div>
    <asp:ObjectDataSource ID="ObjectDataSourceTercero" 
                          runat="server" 
                          SelectMethod="ConsultarVencimientos" 
                          TypeName="Consulta.Manager.MTercero" 
                          SortParameterName="pClausulaOrderBy">
        <SelectParameters>
            <asp:ControlParameter ControlID="txtFiltro" Name="pFiltro" PropertyName="Text" Type="String" DefaultValue="" />
            <asp:ControlParameter ControlID="txtDesde" Name="pDesde" PropertyName="Text" Type="String" DefaultValue="" />
            <asp:ControlParameter ControlID="txtHasta" Name="pHasta" PropertyName="Text" Type="String" DefaultValue="" />
            <asp:Parameter Name="pClausulaOrderBy" Type="String" DefaultValue="Fecha" />
        </SelectParameters>
    </asp:ObjectDataSource>

</asp:Content>
